package com.twf.a03test;

import java.util.Scanner;

public class test {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个整数");
        int n = sc.nextInt();
        double sum = 0.0;
        double wei = 1.0;
        for (int i = 1; i <= n; i++) {
            wei *= 1.0 / i;
            sum += wei;
        }
        System.out.println(sum);
    }
}
